package com.teachoa.enumtype;

public enum MenuEnum {
	
	SYSTEM(1, "工作台", "/main", "shortcut-dashboard"),
	MSG(2, "系统信息发布管理", "/msg?isProMsg=0", "shortcut-messages"),
	DICT(3, "字典管理", "/dict", "shortcut-agenda"),
	PROJECT(4, "项目管理", "/project", "shortcut-contacts"),
	TEACH(5, "教师学生管理", "/teach", "shortcut-medias"),
	PUBLISH(6, "项目信息发布管理", "/msg?isProMsg=1", "shortcut-stats"),
	ASK(7, "项目咨询管理", "/ask", "shortcut-settings"),
	USER(8, "用户管理", "/user", "shortcut-notes"),
	PROJECT1(9, "候选项目管理", "/uncertain", "shortcut-dashboard"),
	PROJECT2(10, "候选项目管理", "/uncertain/student", "shortcut-messages"),
	PROJECT3(11, "项目管理", "/project/student", "shortcut-agenda"),
	COURSE(12, "课程管理", "/course", "shortcut-contacts"),
	PROJECT4(13, "项目管理", "/project/admin", "shortcut-medias"),
	AUDIT(14, "审核管理", "/task/auditList", "shortcut-stats");
	
	private int code;
	private String desc;
	private String url;
	private String clazz;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getClazz() {
		return clazz;
	}
	public void setClazz(String clazz) {
		this.clazz = clazz;
	}
	private MenuEnum(int code, String desc, String url, String clazz) {
		this.code = code;
		this.desc = desc;
		this.url = url;
		this.clazz = clazz;
	}
	
	public static MenuEnum getEnumByCode(int code) {
		MenuEnum[] enums = MenuEnum.values();
		for(MenuEnum enumtype:enums) {
			if(enumtype.getCode()==code) {
				return enumtype;
			}
		}
		return null;
	}

}
